a = str(input("请输入一行字符："))
letters = 0
spaces = 0
digits = 0
others = 0
for c in a:
    if c.isalpha():
        letters+=1
    elif c.isspace():
        spaces+=1
    elif c.isdigit():
        digits+=1
    else:
        others+=1
print("字母有{}个，数字有{}个，空格有{}个，其他有{}个".format(letters,digits,spaces,others))